//package com.plian.system.controller.zzd.finance;
//
//import com.plian.system.config.HasGZWRole;
//import com.plian.system.dto.zzd.ZZDCompanyIndicatorsQuery;
//import com.plian.system.dto.zzd.ZZDFinancingQuery;
//import com.plian.system.dto.zzd.ZZDQuery;
//import com.plian.system.entity.sys.Org;
//import com.plian.system.model.R;
//import com.plian.system.service.sys.orgzation.IOrgService;
//import com.plian.system.service.zzd.IZZDFinanceService;
//import com.plian.system.vo.fr.indicatorsValue.IndicatorsReportVO;
//import com.plian.system.vo.zzd.finance.*;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.math.BigDecimal;
//import java.util.Arrays;
//import java.util.List;
//
//@HasGZWRole
//@RestController
//@RequestMapping(value = "api/zzd/finance")
//@Api(value = "浙政钉-财务相关", tags = "浙政钉财务相关接口")
//public class ZZDFinanceController {
//
//    @Autowired
//    private IZZDFinanceService zzdFinanceService;
//
//    @Autowired
//    private IOrgService orgService;
//
//    @PostMapping("/financial-data")
//    @ApiOperation(value = "经济运行总体情况")
//    public R<FinancialDataVO> financialData(@RequestBody @Validated({ZZDQuery.QueryGroup.class}) ZZDQuery zzdQuery) {
//        return R.data(zzdFinanceService.financialData(zzdQuery));
//    }
//
//    @GetMapping("/asset-indicators")
//    @ApiOperation(value = "获取资产概况指标值")
//    public R<List<IndicatorsReportVO>> getAssetIndicators(@RequestParam(value = "date", required = false) String reportTime) {
//        return R.data(zzdFinanceService.getAssetIndicators(reportTime));
//    }
//
//    @GetMapping("/{code}/indicators-year-data")
//    @ApiOperation("资产概况 历年趋势")
//    public R<IndicatorsYearDataVO> getIndicatorsYearData(@PathVariable String code, @RequestParam(value = "date", required = false) String reportTime) {
//        return R.data(zzdFinanceService.getIndicatorsYearData(code, reportTime));
//    }
//
//    @GetMapping("/operating-indicators")
//    @ApiOperation(value = "获取经营成果指标值")
//    public R<List<IndicatorsReportVO>> getOperatingIndicators(@RequestParam(value = "date", required = false) String reportTime) {
//        return R.data(zzdFinanceService.getOperatingIndicators(reportTime));
//    }
//
//    @GetMapping("/{code}/indicators-unit-detail")
//    @ApiOperation("财务指标 集团概况")
//    public R<List<IndicatorsUnitDetailVO>> getIndicatorsUnitDetail(@PathVariable String code, @RequestParam(value = "date", required = false) String reportTime) {
//        return R.data(zzdFinanceService.getIndicatorsUnitDetail(code, reportTime));
//    }
//
//    @GetMapping("/year-revenue")
//    @ApiOperation(value = "本年营收")
//    public R<RevenueMonthDataVO> yearRevenue(@RequestParam(value = "date", required = false) String reportTime) {
//        return R.data(zzdFinanceService.getYearRevenue(reportTime));
//    }
//
//    @GetMapping("/profits-losses")
//    @ApiOperation(value = "盈利亏损情况")
//    public R<ProfitsLossesVO> profitsLosses(@RequestParam(value = "date", required = false) String reportTime) {
//        return R.data(zzdFinanceService.getProfitsLosses(reportTime));
//    }
//
//    @GetMapping("/material/overview")
//    @ApiOperation("阳光采购 总览")
//    public R<MaterialProcurementOverviewVO> materialOverview() {
//        return R.data(zzdFinanceService.getMaterialOverview());
//    }
//
//    @GetMapping("/material/group-by-project-type")
//    @ApiOperation("阳光采购 交易金额 按项目类别分")
//    public R<List<MaterialProcurementCountDetailVO>> materialGroupByProjectType() {
//        return R.data(zzdFinanceService.getMaterialGroupByProject());
//    }
//
//    @GetMapping("/material/group-by-procurement-way")
//    @ApiOperation("阳光采购 交易金额 按采购方式分")
//    public R<List<MaterialProcurementCountDetailVO>> materialGroupByProcurementWay() {
//        return R.data(zzdFinanceService.getMaterialGroupByProcurementWay());
//    }
//
//    @GetMapping("/large-amount/overview")
//    @ApiOperation("大额资金 总览")
//    public R<LargeAmountOverviewVO> largeAmountOverview(@RequestParam(value = "date", required = false) String reportTime) {
//        return R.data(LargeAmountOverviewVO.builder()
//                .fundBalance(new BigDecimal(3753.36))
//                .totalInterestLiabilities(new BigDecimal(2699.11))
//                .depositLoanRation(new BigDecimal(1.3))
//                .accountNumber(1892)
//                .concentrationFunds(new BigDecimal(1030)).build());
////
////        return R.data(zzdFinanceService.getLargeAmountOverview(reportTime));
//    }
//
//    @GetMapping("/large-amount/unit-detail")
//    @ApiOperation("大额资金 各集团占比")
//    public R<List<LargeAmountUnitDetailVO>> largeAmountUnitDetail(@RequestParam(value = "date", required = false) String reportTime) {
////        return R.data(zzdFinanceService.largeAmountUnitDetail(reportTime));
//        return R.data(Arrays.asList(LargeAmountUnitDetailVO.builder()
//                        .unitName("轨道交通")
//                        .value(new BigDecimal(1071.56))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("交通投资")
//                        .value(new BigDecimal(994.42))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("城投合并")
//                        .value(new BigDecimal(876.23))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("开发投资")
//                        .value(new BigDecimal(800.69))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("工业投资")
//                        .value(new BigDecimal(187.67))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("通商集团")
//                        .value(new BigDecimal(172.64))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("宁兴合并")
//                        .value(new BigDecimal(154.12))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("水务集团")
//                        .value(new BigDecimal(102.65))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("宁波水投")
//                        .value(new BigDecimal(98.69))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("商贸集团")
//                        .value(new BigDecimal(95.34))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("文旅集团")
//                        .value(new BigDecimal(89.87))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("广电合并")
//                        .value(new BigDecimal(32.38))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("报业传媒")
//                        .value(new BigDecimal(27.25))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("公共交通")
//                        .value(new BigDecimal(20.8))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("土地开发")
//                        .value(new BigDecimal(9.89))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("演艺集团")
//                        .value(new BigDecimal(1.04))
//                        .build(),
//                LargeAmountUnitDetailVO.builder()
//                        .unitName("海峰公司")
//                        .value(new BigDecimal(0.08))
//                        .build()));
//    }
//
//    @GetMapping("/financing-org-list")
//    @ApiOperation(value = "融资企业列表")
//    public R<List<Org>> searchDetail() {
//        return R.data(orgService.getFinancingOrgList());
//    }
//
//    @PostMapping("/financing/overview")
//    @ApiOperation(value = "融资总览")
//    public R<FinancingOverviewVO> financingOverview(@RequestBody @Validated(ZZDFinancingQuery.OrverviewQueryGroup.class) ZZDFinancingQuery zzdFinancingQuery) {
//        return R.data(zzdFinanceService.getFinancingOverview(zzdFinancingQuery));
//    }
//
//    @PostMapping("/financing/month-data")
//    @ApiOperation(value = "融资 月度数据")
//    public R<FinancingMonthDataVO> financingMonthData(@RequestBody @Validated(ZZDFinancingQuery.CodeQueryGroup.class) ZZDFinancingQuery zzdFinancingQuery) {
//        return R.data(zzdFinanceService.getFinancingMonthData(zzdFinancingQuery));
//    }
//
//    @PostMapping("/financing/unit-detail")
//    @ApiOperation(value = "融资 列表")
//    public R<List<FinancingUnitDetailVO>> financingUnitDetail(@RequestBody @Validated(ZZDFinancingQuery.CodeQueryGroup.class) ZZDFinancingQuery zzdFinancingQuery) {
//        return R.data(zzdFinanceService.getFinancingUnitDetail(zzdFinancingQuery));
//    }
//
//    @PostMapping("/financing/indicator-trends")
//    @ApiOperation(value = "指标趋势")
//    public R<IndicatorTrendsVO> getIndicatorTrends(@RequestBody @Validated ZZDCompanyIndicatorsQuery zzdCompanyIndicatorsQuery) {
//        return R.data(zzdFinanceService.getIndicatorTrends(zzdCompanyIndicatorsQuery));
//    }
//
//}
